package fyp.spedmew.connector;

import android.os.AsyncTask;
import android.util.Log;

import java.io.IOException;

import fyp.spedmew.backend.entity.jobEndpoint.model.Job;

/**
 * Created by Andy on 22/12/2014.
 */
public class JobFindByIdATask extends AsyncTask<Long, Void, Job> {
    private static final String TAG = new Object(){}.getClass().getCanonicalName();

    @Override
    protected Job doInBackground(Long... params) {
        Job result;
        try {
            result = ApiService.getJobEndpoint().findRecord(params[0]).execute();
        } catch (IOException e) {
            Log.e(TAG, Log.getStackTraceString(e));
            result = null;
        }
        return result;
    }
}